<?php

require_once 'CORE_Plugins_PagSeguro.php';

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{

	protected function _initPlugins(){
		$bootstrap = $this->getApplication();
		if($bootstrap instanceof Zend_Application){
			$bootstrap = $this;
		}

		$bootstrap->bootstrap('FrontController');
		$front = $bootstrap->getResource('FrontController');
		$front->registerPlugin(new CORE_Plugins_PagSeguro());
	}

	protected function _initLogger()
	{
		$writer = new Zend_Log_Writer_Stream('/var/www/carmezin_project/logs/application.log');
		$logger = new Zend_Log($writer);
		Zend_Registry::set('log', $logger);
		
		$admWriter = new Zend_Log_Writer_Stream('/var/www/carmezin_project/logs/admin.log');
		$admLogger = new Zend_Log($admWriter);
		Zend_Registry::set('adminLog', $admLogger);
	}

}

